/*
 * Copyright (c) gitee.com/jiandong001.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */


import { ThemedReactContext } from './ThemedReactContext';
import { UIViewOperationQueue } from './UIViewOperationQueue';
import { ReactStylesDiffMap } from './ReactStylesDiffMap';

import { getYogaEdgeFromNumber } from '../../yoga/YogaEdge';
import { YogaMeasureFunction } from '../../yoga/YogaMeasureFunction';
import { YogaBaselineFunction } from '../../yoga/YogaBaselineFunction';
import { YogaConstants } from '../../yoga/YogaConstants';
import { NativeViewHierarchyOptimizer } from './NativeViewHierarchyOptimizer';
import { Assertions } from '../inner/Assertions';
import { YogaNode } from '../../yoga/YogaNode';
import { Spacing } from './Spacing';
import { NativeKind } from './NativeKind';
import { YogaOverflow } from '../../yoga/YogaOverflow';
import { YogaValue } from '../../yoga/YogaValue';
import { YogaPositionType } from '../../yoga/YogaPositionType';
import { YogaFlexDirection } from '../../yoga/YogaFlexDirection';
import { YogaAlign } from '../../yoga/YogaAlign';
import { YogaDirection } from '../../yoga/YogaDirection';
import { getYogaDirectionFromNumber } from '../../yoga/YogaDirection';
import { YogaJustify } from '../../yoga/YogaJustify';
import { YogaConfig } from '../../yoga/YogaConfig';
import { YogaEdge } from '../../yoga/YogaEdge';
import { YogaDisplay } from '../../yoga/YogaDisplay';
import { YogaWrap } from '../../yoga/YogaWrap';

export abstract class ReactShadowNode {
    abstract isVirtual(): boolean;

    abstract isVirtualAnchor(): boolean;

    abstract isYogaLeafNode(): boolean;

    abstract hoistNativeChildren(): boolean;

    abstract getViewType(): string;

    abstract hasUpdates(): boolean;

    abstract markUpdateSeen(): void;

    abstract markUpdated(): void;

    abstract hasUnseenUpdates(): boolean;

    abstract dirty(): void;

    abstract isDirty(): boolean;

    abstract addChildAt(var1: ReactShadowNode, var2: number): void

    abstract removeChildAt(var1: number): ReactShadowNode;

    abstract getChildCount(): number;

    abstract getChildAt(var1: number): ReactShadowNode;

    abstract indexOf(var1: ReactShadowNode): number

    abstract removeAndDisposeAllChildren(): void

    abstract onBeforeLayout(var1: NativeViewHierarchyOptimizer): void

    abstract updateProperties(var1: ReactStylesDiffMap): void

    abstract onAfterUpdateTransaction(): void

    abstract onCollectExtraUpdates(var1: UIViewOperationQueue): void

    abstract dispatchUpdates(var1: number, var2: number, var3: UIViewOperationQueue, var4: NativeViewHierarchyOptimizer):  boolean

    abstract getReactTag(): number

    abstract setReactTag(var1: number): void

    abstract getRootTag(): number

    abstract setRootTag(var1: number): void

    abstract setViewTypeName(var1: string): void

    abstract getParent(): ReactShadowNode | null;

    abstract getLayoutParent(): ReactShadowNode | null;

    abstract setLayoutParent(var1:ReactShadowNode) : void

    abstract getThemedContext(): ThemedReactContext;

    abstract setThemedContext(var1: ThemedReactContext): void

    abstract shouldNotifyOnLayout(): boolean;

    abstract calculateLayout(): void;

    abstract calculateLayout(var1: number, var2: number): void;

    abstract hasNewLayout(): boolean;

    abstract markLayoutSeen(): void;

    abstract addNativeChildAt(var1: ReactShadowNode, var2: number): void

    abstract removeNativeChildAt(var1: number): ReactShadowNode

    abstract removeAllNativeChildren(): void

    abstract getNativeChildCount(): number

    abstract indexOfNativeChild(var1: ReactShadowNode): number

    abstract getNativeParent(): ReactShadowNode | null

    abstract setIsLayoutOnly(var1: boolean): void;

    abstract isLayoutOnly(): boolean;

    abstract getNativeKind(): NativeKind;

    abstract getTotalNativeChildren(): number;

    abstract isDescendantOf(var1: ReactShadowNode): boolean

    abstract getHierarchyInfo(): string

    abstract setLocalData(var1: Object ): void

    abstract getNativeOffsetForChild(var1: ReactShadowNode): number;

    abstract getLayoutX(): number;

    abstract getLayoutY(): number;

    abstract getLayoutWidth(): number;

    abstract getLayoutHeight(): number;

    abstract getScreenX(): number;

    abstract getScreenY(): number;

    abstract getScreenWidth(): number;

    abstract getScreenHeight(): number;

    abstract getLayoutDirection(): YogaDirection;

    abstract setLayoutDirection(var1: YogaDirection): void;

    abstract getStyleWidth(): YogaValue;

    abstract setStyleWidth(var1: number): void;

    abstract setStyleWidthPercent(var1: number): void;

    abstract setStyleWidthAuto(): void;

    abstract setStyleMinWidth(var1: number): void;

    abstract setStyleMinWidthPercent(var1: number): void;

    abstract setStyleMaxWidth(var1: number): void;

    abstract setStyleMaxWidthPercent(var1: number): void;

    abstract getStyleHeight(): YogaValue

    abstract getFlex(): number
    abstract 
    abstract setStyleHeight(var1: number): void;

    abstract setStyleHeightPercent(va1: number): void

    abstract setStyleHeightAuto(): void

    abstract setStyleMinHeight(va1: number): void

    abstract setStyleMinHeightPercent(va1: number): void

    abstract setStyleMaxHeight(va1: number): void

    abstract setStyleMaxHeightPercent(va1: number): void

    abstract setFlex(va1: number): void

    abstract setFlexGrow(va1: number): void

    abstract setFlexShrink(va1: number): void

    abstract setFlexBasis(va1: number): void

    abstract setFlexBasisAuto(): void

    abstract setFlexBasisPercent(va1: number): void

    abstract setStyleAspectRatio(va1: number): void

    abstract setFlexDirection(va1: YogaFlexDirection): void

    abstract setFlexWrap(va1: YogaWrap): void

    abstract setAlignSelf(va1: YogaAlign): void

    abstract setAlignItems(va1: YogaAlign): void

    abstract setAlignContent(va1: YogaAlign): void

    abstract setJustifyContent(va1: YogaJustify): void

    abstract setOverflow(va1: YogaOverflow): void

    abstract setDisplay(va1: YogaDisplay): void

    abstract setMargin(va1: number, va2: number): void

    abstract setMarginPercent(va1: number, va2: number): void

    abstract setMarginAuto(va1: number): void

    abstract getPadding(va1: number): number

    abstract getStylePadding(va1: number): YogaValue

    abstract setDefaultPadding(va1: number, va2: number): void

    abstract setPadding(va1: number, va2: number): void

    abstract setPaddingPercent(va1: number, va2: number): void

    abstract setBorder(va1: number, va2: number): void

    abstract setPosition(va1: number, va2: number): void

    abstract setPositionPercent(va1: number, va2: number): void

    abstract setPositionType(var1: YogaPositionType): void

    abstract setShouldNotifyOnLayout(var1: boolean): void

    abstract setBaselineFunction(var1: YogaBaselineFunction): void

    abstract setMeasureFunction(var1: YogaMeasureFunction): void

    abstract isMeasureDefined(): boolean;

    abstract dispose(): void;

    abstract setMeasureSpecs(var1: number, var2: number): void;

    abstract getWidthMeasureSpec(): number;

    abstract getHeightMeasureSpec(): number;

    abstract calculateLayoutOnChildren(): IterableIterator<ReactShadowNode> | null;
}
